<?php
function smarty_insert_getusernamesg($param, &$smarty) {
				
	if ($_SESSION['union_username']=='') {
		$string="<form method=\"post\" id=\"formsg\" action=\"https://passport.9wee.com/login\" onsubmit='javascript: return checklogininfo();'>
					<ul>
						<li><img src=\"../images/sanguo/tongxingzheng.gif\" /> <input class=\"login_input\" name=\"username\" type=\"text\" /></li>
					<li><img src=\"../images/sanguo/mima.gif\" /><input id='_REFERER' type='hidden' name='_REFERER' value='http://".$param['url']."/game/?game=102'> <input class=\"login_input\" name=\"password\" type=\"password\" /></li>
					<li style=\"margin-top:18px;\"><input type=\"image\" src=\"../images/sanguo/login_buttom.gif\" />　<a href=\"javascript:;\" onclick=\"var obj=document.getElementById('cover');obj.style.display='block';obj.style.height=document.documentElement.scrollHeight+'px';server_select_sg('open');\"\"><img src=\"../images/sanguo/login_buttom1.gif\" /></a></li>
					</ul></form>";
	} else {
		$string="<ul><li>".$_SESSION['union_username']."</li>
					<li>欢迎您回来</li>
					<li style=\"margin-top:18px;\"><a href=\"javascript:;\" onclick=\"server_select('open');\"><img src=\"../images/sanguo/jinru.gif\" /></a>　<a href=\"../logout.php?url=http://".$param['url']."/game/?game=102\"><img src=\"../images/sanguo/zhuxiao.gif\" /></a></li></ul>";
					
	}
	return $string;
 }
?>
